import request from '@/utils/request1'

// 删除合同项目
export function delProject(data) {
  return request({
    url: '/project/delEpc',
    method: 'POST',
    data
  })
}

// 合同项目列表
export function getListProject(params) {
  return request({
    url: '/project/getListEpcProjectByParam',
    method: 'POST',
    params
  })
}

// 新增合同项目
export function addProject(data) {
  return request({
    url: '/project/addEpc',
    method: 'post',
    data
  })
}

// 删除合同项目  修改合同项目信息
export function updateProject(data, onUploadProgress) {
  return request({
    url: '/project/updateProjectInfo',
    method: 'POST',
    onUploadProgress: onUploadProgress,
    data
  })
}

// 删除项目资料  修改项目资料
export function updateProjectInfo(data, onUploadProgress) {
  return request({
    url: '/projectInfo/updateProjectInfo',
    method: 'post',
    onUploadProgress: onUploadProgress,
    data
  })
}

// 模糊查询团队下拉信息
export function selectTeam(params) {
  return request({
    url: '/administrative/teams/getTeamIdAndNameListByName',
    method: 'post',
    params
  })
}

// 查询全部父级分类的接口
export function getParentProfessionList() {
  return request({
    url: '/professions/getParentProfessionList',
    method: 'post'
  })
}

// 合同编号查询
export function findByCode(params) {
  return request({
    url: '/project/findByCode',
    method: 'post',
    params
  })
}

export function selectByProject(params) {
  return request({
    url: '/project/findRepeatProject',
    method: 'post',
    params
  })
}
